package com.it.you.service.pay;

import com.it.you.common.enums.PayCodeEnum;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;

@PayCodeEnum(value = "alia", name = "支付宝支付")
@Service
public class AliaPay implements IPay {

    @PostConstruct
    public void init() {
        PayStrategyFactory.register("aliaPay", this);
    }

    @Override
    public String pay() {
        return "===发起支付宝支付===";
    }

    @Override
    public boolean support(String code) {
        return "alia".equals(code);
    }
}
